package com.sec.android.app.myfiles.facade.cmd;

import com.sec.android.app.myfiles.info.AppConstants;
import com.sec.android.app.myfiles.module.abstraction.FileRecord;
import com.sec.android.app.myfiles.navigation.NavigationInfo;
import com.sec.android.app.myfiles.navigation.NavigationManager;

import org.puremvc.java.multicore.interfaces.INotification;
import org.puremvc.java.multicore.patterns.command.SimpleCommand;

/**
 * Created by n.chaubey on 13-07-2017.
 */
public class GoHomeBlankCmd extends SimpleCommand {
    @Override
    public void execute(INotification notification) {
        Object[] params = (Object[]) notification.getBody();
        int processId = (Integer) params[0];
        NavigationInfo naviInfo = (NavigationInfo) params[1];
        NavigationManager navigationManager = NavigationManager.getInstance(processId);
        FileRecord record = FileRecord.createFileRecord(FileRecord.StorageType.Blank, AppConstants.StoragePath.BLANK);
        naviInfo = NavigationInfo.getInstance(naviInfo, record);
        navigationManager.enterWithClean(naviInfo);
    }
}
